#include "Sort.h"

void Sorttest()
{
	srand((unsigned)time(0));

	/*int* a = (int*)malloc(sizeof(int) * 20);
	if (a == NULL)
	{
		perror("malloc");
		exit(-1);
	}*/

	int a[] = { 5,2,3,1 };

	/*for (int i = 0; i < 20; i++)
	{
		a[i] = rand() % 50;
	}*/
	//int a[] = { 9,4,5,10,13,5,7,3,2 };

	for (int i = 0; i < 4; i++)
	{
		printf("%d ", a[i]);
	}
	printf("\n");

	HeapSort(a, 4);
	
	for (int i = 0; i < 4; i++)
	{
		printf("%d ", a[i]);
	}
}



int main()
{
	Sorttest();
	return 0;
}